<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增付款申请单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-payment-add"   th:object="${pId}">
            <div class="form-group">
                <div class="col-sm-8">
                    <input  name="pId" class="form-control" th:value="${pId}" type="hidden">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">劳务合同：</label>
                <div class="col-sm-8">
                    <input name="aTheLabor" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">劳务金额：</label>
                <div class="col-sm-8">
                    <input name="aLaborCost" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">供应商名称/应付单位名称：</label>
                <div class="col-sm-8">
                    <input name="aSupplierName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">申请内容：</label>
                <div class="col-sm-8">
                    <input name="aApplicationContent" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label">申请状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <div class="radio-box">
                            <select name="aStatus" th:with="type=${@dict.getType('payment_status')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label">审批意见：</label>
                <div class="col-sm-8">
                    <input name="aOpinion" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "ruoyi/payment"
        $("#form-payment-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-payment-add').serialize());
            }
        }

        $("input[name='aCreateTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>